-- add_sc_prop
-- create by zhuangsl
-- 附加天空属性

return {
    apply = function(source, target, skillId, round, para, value)
        local effectRound = -1;

        if para[2] >= 0 then
            effectRound = round + para[2];
        end

        local skyProp = { [para[3]] = para[4] };

        -- 附加属性
        if para[1] == 0 then
            SkyPropM.recordRoundProp(source, skyProp, effectRound);
        else
            SkyPropM.recordRoundProp(target, skyProp, effectRound);
        end

        -- 0伤害
        return { ["damage"] = 0, ["cure"] = 0, };
    end,

    parse = function(desc)
        local arr = string.explode(desc, ",");
        return { tonumber(arr[1]), tonumber(arr[2]), arr[3], tonumber(arr[4]),};
    end,

    getDetail = function(para)
        local desc = "";
        if #para == 4 then
            local skyProp = { [para[3]] = para[4] };
            desc = SkyPropM.getDesc(skyProp);
        end

        return desc;
    end,
};
